#递归函数
#列一.递归方法求阶乘
def jiecheng(n):
    if n==1:return 1
    else:return n*jiecheng(n-1)
print(jiecheng(1))    
print(jiecheng(5))  
print(jiecheng(10))

#列二.递归函数求斐波拉切数列
def shulie(n):
    if n == 1 or n == 2:return 1
    else:return shulie(n-1) +shulie(n-2)
print(shulie(10))    
print(shulie(1))
print(shulie(2))

#列三.递归函数求最大公约数
def gcd(a,b):
    if b==0:return a
    else:return gcd(b,a%b)
print('gcd(12,24)=',gcd(12,24))
print('gcd(24,12)=',gcd(24,12))
